﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

//buddy
using Zeta;
using Zeta.Common;
using Zeta.CommonBot;
using Zeta.Common.Plugins;
using Zeta.Internals;
using Zeta.Internals.Actors;
using Zeta.Internals.Service;

namespace BossHog.ProfileBuilder
{
    public class UseObjectElement : BuddyXmlBase, IOrderChildElement
    {
        public UseObjectElement() : base()
        {
            try
            {
                if (null != Zeta.ZetaDia.Me)
                {
                    x = Zeta.ZetaDia.Me.Position.X.ToString();
                    y = Zeta.ZetaDia.Me.Position.Y.ToString();
                    z = Zeta.ZetaDia.Me.Position.Z.ToString();
                }
                isPortal = "False";
                questId = Zeta.ZetaDia.CurrentQuest.QuestSNO.ToString();
                actorId = "-1";
            }
            catch (Exception ex) {Logging.Write(LogLevel.Verbose, "[BossHog] Error: " + ex.Message); }
        }

        public string actorId { get; set; }
        public string isPortal { get; set; }
        public string destinationWorldId { get; set; }
        public string x { get; set; }
        public string y { get; set; }
        public string z { get; set; }

        //public override string ToString()
        //{
        //    return string.Format("<UseObject questId=\"{0}\" actorId=\"{1}\" x=\"{2}\" y=\"{3}\" z=\"{4}\" isPortal=\"{5}\" destinationWorldId=\"{6}\" />", new object[] { questId, actorId, x, y, z, isPortal, destinationWorldId });
        //}

    }
}
